<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改公告类型')" />
</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-post-edit" th:object="${manager}">
			<input id="postId" name="postId" type="hidden" th:field="*{id}"/>
			<div class="form-group">
				<label class="col-sm-3 control-label">公告名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="title" id="title" th:field="*{title}" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">公告内容：</label>
				<div class="col-sm-8">
					<textarea id="content" name="content" class="form-control">[[*{content}]]</textarea>
				</div>
			</div>


			<div class="form-group">
				<label class="col-sm-2 control-label">有效期：</label>
				<div class="col-sm-10">
					<div class="input-daterange input-group">
						<input type="text" class="time-input form-control" id="time_start" name="time_start"
							   placeholder="开始时间" th:field="*{time_start}" readonly>
						<span class="input-group-addon">-</span>
						<input type="text" class="time-input form-control" id="time_end" name="time_end" placeholder="结束时间" th:field="*{time_end}"
							   readonly>
					</div>
				</div>
			</div>


			<div class="form-group">
				<label class="col-sm-2 control-label">公告类型：</label>
				<div class="col-sm-10">
					<select name="parent_id" lay-search="" class="form-control input1" th:field="*{parent_id}"  data-placeholder="请选择">
						<!--<option value="">请选择</option>-->
						<option th:selected="${type.tid eq type.tid}" th:each="type : ${session.types}"
								th:value="${type.tid}" th:text="${type.tname}">
						</option>
					</select>
				</div>
			</div>




		</form>
	</div>
	<th:block th:include="include :: footer" />
	<script type="text/javascript">
		var prefix = ctx + "notice/manager";
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/edit", $('#form-post-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
